def dfs(V, n, k):
    if k >= n:
        print(V)
        return
    V[k] = 0
    dfs(V, n, k + 1)
    V[k] = 1
    dfs(V, n, k + 1)


n = 5
V = [0] * 5
dfs(V, n, 0)
